home *** CD-ROM | disk | FTP | other *** search
/ NEC SuperScript 860 Solutions / NEC SuperScript 860 Solutions.iso / internet / scripts.lib / TTNNET.SCR < prev    next >
Text File  |  1994-12-29  |  1KB  |  52 lines

  1. !
  2. !  Copyright (c) 1994
  3. !  by CompuServe Incorporated, Columbus, Ohio
  4. !
  5. !  The information in this software is subject to change without
  6. !  notice and should not be construed as a commitment by CompuServe.
  7. !
  8. !  TTN-NET:
  9. !    Connect to TTN-NET
  10. !    Success:  returns %Success
  11. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !+V
  14. ! "3.5.2"
  15. !-V
  16.  
  17. Attempts = 5;
  18. TTN_Address = "CNST";
  19. on cancel goto Return_Cancel;
  20. show "Connecting to TTN-Net";
  21.  
  22. Wait_TTN:
  23.     if Attempts = 0 goto Return_Failure;
  24.     Attempts = Attempts - 1;
  25.  
  26.     wait
  27.         "@"        goto Send_Address,
  28.         "Host Name"    goto Return_Success,
  29.         "User ID"    goto Return_Success,
  30.         %mdm_Failure    goto Return_Failure
  31.     until 180;
  32.  
  33.     send %CR;
  34.     goto Wait_TTN;
  35.  
  36. Send_Address:
  37.     show "Sending CompuServe Address...";
  38.     wait until 10;
  39.     send TTN_Address & %CR;
  40.     goto Wait_TTN;
  41.  
  42. Return_Failure:
  43.     define %FailureMsg = "TTN-Net not responding";
  44.     exit %Failure;
  45.  
  46. Return_Cancel:
  47.     exit %Cancel;
  48.  
  49. Return_Success:
  50.     send %CR;
  51.     exit %Success;
  52.